package com.string.demo;


import java.util.Scanner;

public class reverseStringDemo {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String line = sc.nextLine();

        String s = myDeverse(line);

        System.out.println("输出转换后的结果"+s);



    }

    public static String myDeverse(String s) {
        StringBuilder sb = new StringBuilder(s);
        sb.reverse();
          String ss = sb.toString();
          return  ss;
    }




}
